Auto focusing device and a focus detecting device for determining the phase difference between image signals

ABSTRACT

A focus detecting device for determining the focus state of an imaging optical system, of a type for time-sequentially entering light beams, transmitted by different areas of an imaging optical system, into a sensor and detecting the phase difference between the image signal obtained from the sensor means corresponding to such time-sequentially entered light beams. 
     The device determines the positional difference in the vertical direction of the light beams (images) time-sequentially entering the sensor, and determines the storage positions of the outputs (image signals) from the sensor corresponding to the light beams (images) of the respective areas, thereby enabling exact focus detection even in case the images are received in vertically different positions on the sensor.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an improvement on a focus detecting device that is adapted to be equipped on a digital camera or the like and which time-sequentially divides the photographing light beam passing through an optical system into at least two different areas, converts optical images, time-sequentially focused on image sensor means through respective areas, into image signals and detects the phase difference of the image signals thereby calculating the focus state of the optical system.

2. Related Background Art

Among the automatic focusing devices employed in the conventional camera that uses silver halide-based film of the single lens reflex type, there are widely employed those base on the phase difference detecting system.

FIG. 48 is a view showing the arrangement of the optical system of a single lens reflex type, provided with a conventional focus detecting device of the phase difference detecting system, wherein a light beam 9 a emerging from a photographing lens 1 is partly reflected by a main mirror 2, consisting of a half mirror, as a light beam 9 b toward a focusing screen 3 and focuses an image of the object on a matted face thereof. The photographer observes the object image on the focusing screen, through eyepiece lenses 5 a, 5 b and a pentagonal roof prism 4.

On the other hand, among the light beam 9 a, a part 9 e transmitted by the main mirror 2 is reflected by a sub mirror 6 and is guided as a light beam 9 f to a focus detecting device 7, which detects, by means of the light beam 9 f, the focus state (defocus amount) of the photographing lens 1 relative to a silver halide-based photographic film 8.

The detected defocus amount is larger than a predetermined range of focus so that the photographing lens is judged as in an out-of-focus state, and an unrepresented control circuit so drives a focusing lens of the photographing lens 1 as to cancel the defocus amount, thereby performing the focusing operation.

In the following there will be explained, with reference to FIGS. 49A to 49C, the focus detecting principle of the conventional focus detecting device.

FIG. 49A shows an in-focus state, wherein light beams 16 a, 16 b passing respectively through two different pupils of a photographing lens 10 are focused on a primary focal plane 14, and images of the object on such primary focal plane are refocused by secondary imaging lenses 12 a, 12 b on a sensor plane 13 having two line sensors for each of the refocused images. A field lens 11 is provided in the vicinity of the primary image plane of the photographing lens 10, thus efficiently guiding the light beam of a predetermined image height to the sensor plane 13 and preventing the loss in the amount of light resulting from the increase in the image height. The two light beams 16 a, 16 b, passing through the different pupils of the photographing lens 10, are in general limited by unrepresented diaphragms positioned immediately in front of or immediately behind the secondary imaging lenses 12 a, 12 b, and the photographing lens 10 is not provided with a member for dividing the pupil. Assuming that δ₀ is the relative distance (phase difference) of the positions of the two images in the in-focus state, the amount of defocus in the current state and the direction thereof can be known from the difference between δ₀ and the actually given phase difference.

FIG. 49B shows a state in which the lens is focused in front by a defocus amount d1, wherein the phase difference δ₁ of the two images becomes smaller than δ₀, and the difference (δ₀−δ₁) increases with the increase of d1.

FIG. 49C shows a state in which the lens is focused in the back by a defocus amount d2, wherein the phase difference δ₂ of the two images becomes larger than δ₀, and the difference (δ₂−δ₀) increases with the increase of d1. In this manner the detection of the phase difference of the two images focused on the sensor plane 13 allows the camera to detect the focus state of the photographing lens, or the magnitude and the direction of the defocus amount.

However, in the prior art, the single lens reflex camera becomes inevitably bulky for securing the space for the focus detecting device and becomes expensive by the cost required therefor. Also, the accuracy of focusing is deteriorated as the relative positional relationship between the photographic film and the focus detecting device is varied by a change in the temperature or by a time-dependent variation in the quick return mirror.

The image taking apparatus, such as a digital camera, employ a solid-state image pickup device as the image sensor and can avoid the above-mentioned drawbacks by employing such solid-state image pickup device as the focus detecting sensor. A method for utilizing the solid-state image pickup device for the focus detecting sensor, for example employed in video cameras, consists of effecting the focusing operation, based on the detected contrast of the object image on the solid-state image pickup device, but such method is incapable of high-speed and highly precise focusing, as the exact defocus amount cannot be detected.

The highly precise high-speed focusing, without the above-mentioned drawbacks, can however, be achieved by providing the photographing lens with pupil dividing means for rendering transmissive either one of the two different pupil areas, and detecting the relative positional difference, or the phase difference, between the object image obtained by the light beam transmitted by such transmissive pupil area and an object image obtained by the light beam transmitted by the other pupil area, thereby detecting the defocus amount.

However, in such conventional configuration, the image signal of the object image formed by the light beam transmitted by a pupil area is stored at first and then that of the object image formed by the light beam transmitted by the other pupil area is stored later, so that the two image signal storage operations are mutually different in time. If the object image on the image pickup sensor moves in a period from the storage of the first image signal to that of the second image signal, there will result a detection error because of such image movement.

This drawback will be explained with reference to FIGS. 13A and 13B, which illustrate a case where the object image on the image pickup sensor moves in the vertical direction by a hand vibration or by the movement of the object itself.

If the camera is inclined downwards by a hand vibration after the storage of a first object image L shown in FIG. 13A, the object image R to be stored next moves upwards as shown in FIG. 13B. In such case, the image signal Rc of an image pickup position the same as that for the image signal Lc, is in fact generated by looking at the object from a lower position, and therefore the camera assumes the image signals indicate a different shape. The correlation calculation utilizing the image signals of different forms leads to an erroneous phase difference.

In this manner the vertical movement of the object image on the image pickup element, caused by hand vibration or by movement of the object, will result in an error in the detected phase difference.

SUMMARY OF THE INVENTION

One aspect of the application is to provide an apparatus capable of determining the light receiving position of each image in the vertical direction of an image pickup element (sensor means) according to the vertical moving position of the image on the image pickup element, storing image signals in such determined positions, and detecting the phase difference between thus fetched image signals.

One aspect of the application is to provide a focus detecting device provided with image pickup means for taking an image; an image taking optical system; pupil shape changing means for time-sequentially dividing an image taking light beam, transmitted by the image taking optical system, into at least two different areas and focusing the divided light beams on the image pickup means; and calculation means for converting the optical images, time-sequentially formed on the image pickup means respectively through the different areas, into image signals and calculating the focus state of the image taking optical system by detecting the phase difference of the image signals, the device comprising movement amount detecting means for detecting the amount of movement of the optical image on the image pickup element, in a direction perpendicular to the direction of arrangement of the above-mentioned areas (for example in the vertical direction of a camera), and image position changing means for changing the position of the image signal to be employed in the calculation of the phase difference to be executed in the calculation means.

One aspect of the application is to provide an apparatus for calculating a correlation value indicating the level of coincidence of time-sequentially obtained two images by a correlation calculation, determining the positions of the image signals showing a high level of coincidence based on such correlation value and calculating the phase difference utilizing the image signals of such positions.

Still other objects of the present invention, and the features thereof, will become fully apparent from the following description which is to be taken in conjunction with the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1A, 1B and 1C are schematic views showing light beams passing through different pupil areas and focus states thereof on a CCD surface, in an in-focus state in cameras constituting embodiments of the present invention;

FIGS. 2A, 2B and 2C are schematic views showing light beams passing through different pupil areas and focus states thereof on a CCD surface, in a front-focused state in the cameras constituting the embodiments of the present invention;

FIGS. 3A, 3B and 3C are schematic views showing light beams passing through different pupil areas and focus states thereof on a CCD surface, in a rear-focused state in the cameras constituting the embodiments of the present invention;

FIG. 4 is a perspective view showing a portion for changing the pupil area, equipped in the cameras constituting the embodiments of the present invention;

FIG. 5 is a longitudinal cross-sectional view of the configuration shown in FIG. 4;

FIG. 6 is a block diagram showing the principal electrical configuration of the cameras constituting the embodiments of the present invention;

FIGS. 7A, 7B and 7C are views showing a pupil area varying operation in the cameras constituting the embodiments of the present invention;

FIGS. 8, 9 and 10 are views for explaining the driving method for the CCD shown in FIG. 6;

FIGS. 11 and 12 are charts for explaining a phase difference detecting operation by correlation calculation in the cameras of the embodiments of the present invention;

FIGS. 13A and 13B are views showing the situation in the case when the camera vibrates in the vertical direction at the photographing operation;

FIGS. 14 and 16 are charts showing the change in the correlation in the cameras of the embodiments of the present invention;

FIG. 15 is a chart showing the method of interpolation in the cameras of the embodiments of the present invention;

FIG. 17 is a flow chart showing the process for calculating the shift range in the cameras of the embodiments of the present invention;

FIGS. 18 and 19 are charts showing the method for detecting the hand vibration in the camera of a first embodiment of the present invention;

FIG. 20 is a flow chart showing the control sequence in the camera of the first embodiment of the present invention;

FIG. 21 is a flow chart showing an example of the focus detecting operation in the camera of the first embodiment of the present invention;

FIG. 22 is a flow chart showing an example of the defocus amount calculating operation in the camera of the first embodiment of the present invention;

FIG. 23 is a flow chart showing another example of the focus detecting operation in the camera of the first embodiment of the present invention;

FIG. 24 is a flow chart showing another example of the defocus amount calculating operation in the camera of the first embodiment of the present invention;

FIG. 25 is a chart showing the method for detecting a hand vibration in a camera of a second embodiment of the present invention;

FIG. 26 is a flow chart showing an example of the focus detecting operation in the camera of the second embodiment of the present invention;

FIG. 27 is a flow chart showing an example of the defocus amount calculating operation in the camera of the second embodiment of the present invention;

FIG. 28 is a flow chart showing another example of the focus detecting operation in the camera of the second embodiment of the present invention;

FIG. 29 is a flow chart showing another example of the defocus amount calculating operation in the camera of the second embodiment of the present invention;

FIG. 30 is a flow chart showing another example of the focus detecting operation in the camera of the second embodiment of the present invention;

FIG. 31 is a flow chart showing another example of the defocus amount calculating operation in the camera of the second embodiment of the present invention;

FIG. 32 is a chart showing the method for detecting a hand vibration in the camera of a third embodiment of the present invention;

FIG. 33 is a flow chart showing an example of the focus detecting operation in the camera of the third embodiment of the present invention;

FIG. 34 is a flow chart showing an example of the defocus amount calculating operation in the camera of the third embodiment of the present invention;

FIG. 35 is a flow chart showing another example of the focus detecting operation in the camera of the third embodiment of the present invention;

FIG. 36 is a flow chart showing another example of the defocus amount calculating operation in the camera of the third embodiment of the present invention;

FIG. 37 is a flow chart showing another example of the focus detecting operation in the camera of the third embodiment of the present invention;

FIG. 38 is a flow chart showing another example of the defocus amount calculating operation in the camera of the third embodiment of the present invention;

FIG. 39 is a chart showing the relationship between the time interval of the storage of the image signals and the calculation method in the camera of a fourth embodiment of the present invention;

FIG. 40 is a flow chart showing the focus detecting operation in the camera of the fourth embodiment of the present invention;

FIG. 41 is a flow chart showing a part of the control sequence for calculating the number of the image signals, in the camera of the fourth embodiment of the present invention;

FIG. 42 is a continuation of the flow chart shown in FIG. 41;

FIG. 43 is a flow chart showing the details of the operation “image signal storage 2” in FIG. 40;

FIG. 44 is a flow chart showing the details of the operation “image signal storage 3” in FIG. 40;

FIG. 45 is a flow chart showing the details of the operation “image signal storage 4” in FIG. 40;

FIG. 46 is a flow chart showing the details of the operation “image signal storage 5” in FIG. 40;

FIG. 47 is a flow chart showing the defocus amount calculating operation of the camera of the fourth embodiment of the present invention;

FIG. 48 is a view showing the arrangement of the optical system in an ordinary single lens reflex camera; and

FIGS. 49A, 49B and 49C are views showing the principle of focus detection in a single lens reflex camera of the configuration shown in FIG. 48.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

The present invention will be explained in detail, based on the embodiment as illustrated.

FIGS. 1A to 1C, 2A to 2C and 3A to 3C are views showing the detecting principle of a focus detecting device constituting a second embodiment of the present invention.

FIGS. 1A to 1C illustrate light beams in an in-focus state. In a state shown in FIG. 1A, the light beam 23 a emerging from a photographing lens 20 is focused, on the optical axis 24 thereof, on the light receiving face of an image pickup device 22, with a zero defocus amount. Also when a diaphragm 21 b having an aperture (first pupil area) in the upper part of the photographing lens 20 is inserted as shown in FIG. 1B, the light beam 23 b emerging therefrom still enters, on the light receiving face of the image pickup device 22, a position on the optical axis 24 of the photographing lens. Also when a diaphragm 21 c having an aperture (second pupil area) in the lower part of the photographing lens 20 is inserted as shown in FIG. 1C, the light beam 23 c emerging therefrom still enters, on the light receiving face of the image pickup device 22, a position on the optical axis 24 of the photographing lens.

Thus, in the in-focus state, the light beam transmitted by the first pupil area (hereinafter simply represented as “first pupil”) and that transmitted by the second pupil area (hereinafter simply represented as “second pupil”) enter the same position on the image pickup device 22, so that the phase difference between the two images is zero.

FIGS. 2A to 2C illustrate the light beams in a front-focused state. In a state shown in FIG. 2A, the light beam 25 a emerging from the photographing lens 20 is focused at a position which is in front, by d_(a), of the light receiving face of the image pickup device 22, so that the defocus amount is d_(a). FIG. 2B shows a state in which a diaphragm 21 b having an aperture (first pupil) in the upper part of the photographing lens 20 is inserted. The light beam 25 b emerging from the photographing lens 20 enters, on the light receiving face of the image pickup device 22, a position that is below the optical axis 24 of the photographing lens by a distance δ_(a)/2. Also in the case of a diaphragm 21 c having an aperture (second pupil) in the lower part of the photographing lens 20 being inserted as shown in FIG. 2C, the light beam 25 c emerging from the photographing lens 20 enters, on the light receiving face of the image pickup device 22, a position that is above the optical axis 24 of the photographing lens by a distance δ_(a)/2.

Thus, in such rear-focused state, the light beams respectively transmitted by the first and second pupils generate a phase difference δ_(a) on the image pickup device.

FIGS. 3A to 3C illustrate the light beams in a rear-focused state. In a state shown in FIG. 3A, the light beam 26 a emerging from the photographing lens 20 is focused at a position behind, by d_(b), the light receiving face of the image pickup device 22, so that the defocus amount is d_(b). FIG. 3B shows a state in which a diaphragm 21 b having an aperture (first pupil) in the upper part of the photographing lens 20 is inserted. The light beam 26 b emerging from the photographing lens 20 enters, on the light receiving face of the image pickup device 22, a position above the optical axis 24 of the photographing lens by a distance δ_(b)/2. Also in the case of a diaphragm 21 c having an aperture (second pupil) in the lower part of the photographing lens 20 being inserted as shown in FIG. 3C, the light beam 26 c emerging from the photographing lens 20 enters, on the light receiving face of the image pickup device 22, a position below the optical axis 24 of the photographing lens by a distance δ_(b)/2.

Thus, in such a rear-focused state, the light beams respectively transmitted by the first and second pupils generate a phase difference δ_(b) on the image pickup device.

By taking the phase difference as positive in case the object image formed by the light beam transmitted by the second pupil is positioned above that formed by the light beam transmitted by the first pupil, the phase difference in the front-focused state shown in FIGS. 2A to 2C is represented by “+δ_(a)” while that in the rear-focused state shown in FIGS. 3A to 3C is represented by “−δ_(b)”. Thus the magnitude and the direction of the defocus amount can be known from the magnitude and the sign of the phase difference.

FIG. 4 is a perspective view showing a part of the optical system of a camera employing a focus detecting device constituting an embodiment of the present invention, and FIG. 5 is a longitudinal cross-sectional view of the optical system shown in FIG. 4.

In these drawings, numerals 60, 61 indicate a photographing lens, in which a focusing lens 61 is driven by an unrepresented lens driving motor to effect focusing. There are also shown an optical low-pass filter 62, an infrared cut-off filter 63, a solid-state image pickup device 64, composed of a CCD, for converting an optical image into an image signal, a focus detecting diaphragm 65, which can be inserted into and retracted from the optical path of the photographing lens by a motor 66, and a focus detecting light shading board 67, which can be inserted into and retracted from the optical path of the photographing lens by a motor 68.

FIG. 6 is a schematic block diagram showing the electrical configuration of the camera with the focus detecting device of the present embodiment.

Referring to FIG. 6, a solid-state image pickup device 70, composed of a CCD (corresponding to the CCD 64 shown in FIG. 4) releases an analog image signal, which is converted by an A/D converter 71 into a digital signal and sent to a digital signal processing unit 72. There are also provided a VRAM 73 constituting memory means for storing image data to be displayed on an electronic view finder (EVF) 76; a D/A converter 74 for converting the image data from the VRAM 73 into an analog signal; and an LCD driver 75 for controlling the electronic view finder (EVF) 76 for displaying therein the image released from the VRAM 73.

There are also provided a buffer memory 77 composed, for example, of a DRAM for temporarily storing the digital image signal and various data; a memory 78 for storing the photographed image data; a system control unit 79 for controlling the entire camera; a display member 80 for displaying the setting of the camera and the control state thereof; an LCD driver 81 for driving the display member 80; a CCD driver 82 for driving the CCD 70; a lens control unit 83 for controlling the diaphragm and the light shading board for focus detection, the diaphragm for photographing and the focusing lens; and an operation switch 84 for setting the photographing mode and for detecting the shutter releasing operation.

The foregoing represents the principal configuration of the camera of the present embodiment.

FIGS. 7A to 7C illustrate the function of the focus detecting diaphragm 65 and the focus detecting light shading board 67 shown in FIGS. 4 and 5. When the focus detecting operation is not conducted, the focus detecting diaphragm 65 and the light shading board 67 are retracted, as shown in FIG. 7A, from a pupil area 69 corresponding to the full-open photographing diaphragm (passing area of the effective light beam). When the focus detecting operation is conducted, the focus detecting diaphragm 65 is inserted, by the motor 66, into the optical path of the photographing lens as shown in FIGS. 7B and 7C, while the focus detecting light shading board 67 is moved by the motor 68 to cover either an aperture 65 a or 65 b of the diaphragm 65.

An image signal obtained by the light beam transmitted by the left pupil, in the state shown in FIG. 7B, is represented by L, while an image signal obtained by the light beam transmitted by the right pupil, in the state shown in FIG. 7C, is represented by R.

In the following there will be explained the driving method for the solid-state image pickup device or CCD, with reference to FIGS. 8, 9 and 10.

In the focus detecting device of the present embodiment, utilizing the pupil division on a time-shared basis, the image signal L formed by the light beam transmitted by the left pupil is stored at first and then the image signal R formed by the light beam transmitted by the right pupil is stored, and the time interval of the storage of the image signals L and R is desirably as short as possible since a shorter interval reduces the error in the focus detection, resulting from the movement of the object image caused, for example, by hand vibration.

The read-out of the pixel data, if executed on the entire area of the CCD as in the photographing operation, will take a long time, thus prolonging the time interval between the storages of the image signals. For this reason, the storage of the image signal for focus detection is executed by the pixel read-out of a higher speed, as will be explained in the following.

FIG. 8 is a schematic view of an interline CCD, wherein shown are pixels 31, vertical charge transfer elements 32, a horizonal charge transfer element 33, and an output unit 34.

Signal charges, obtained by photoelectric conversion in the pixels, are transferred to the vertical charge transfer elements 32, and are transferred in succession toward the horizontal charge transfer element 33 according to 4-phase driving pulses φV1, φV2, φV3, φV4. The horizontal charge transfer element 33 transfers the signal charges of a horizontal row, transferred from the vertical signal transfer elements 32, in succession toward the output unit 34 according to 2-phase driving pulses φH1, φH2, and the signal charges are converted in the output unit 34 into voltages and outputted.

FIG. 9 is a schematic view of the image taking area of the CCD. In the present embodiment, for achieving a high-speed read-out operation, the signal charges are read at a normal speed only in an area 41 used for the focus detection, and are sweep transferred at a higher speed in other areas 42, 43.

FIG. 10 is a timing chart of a vertical synchronization period, in case the vertical charge transfer elements 32 of the aforementioned CCD are 4-phase driven.

A vertical synchronization signal VD indicates the vertical blanking period by a low potential state, while a horizontal synchronization signal HD indicates the horizontal blanking period by a low potential state. There are also shown 4-phase drive pulses φV1, φV2, φV3 and φV4, for the vertical charge transfer elements 32, and read-out pulses 51, 52 for transferring the signal charges, obtained by the photoelectric conversion in the pixels 31, to the vertical charge transfer elements 32. Among the 4-phase drive pulses, those 53 and 54 are high-speed sweep drive pulses for high-speed transfer of the signal charges in the vertical charge transfer elements 32 in the areas 42, 43 in FIG. 9, and are generated at a higher rate than in the ordinary drive pulses.

By sweeping out the signal charges at a high speed in the areas not used for focus detection, it is rendered possible to reduce the time required for reading out the image signal, thereby preventing the deterioration of the precision of the focus detection and achieving the focus detecting operation at a higher speed.

In the following there will be explained a method for determining the phase difference by correlation calculation, with reference to FIGS. 11 and 12.

FIG. 11 shows the image signal L formed by the light beam transmitted by the left pupil and the image signal R formed by the light beam transmitted by the right pupil, and the two image signals have a phase difference δ. The image signal L is composed of values l₁-l₂₃, respectively corresponding to the signal charges of the pixels, while the image signal R is similarly composed of values r₁-r₂₃. At first a correlation C(τ) is calculated from the image signals L and R, according to the following formula: $\begin{matrix} {{C(\tau)} = {\sum\limits_{i = 1}^{10}{\max \left\lbrack {{l\left( {i + 6} \right)},{r\left( {i + \tau + 6} \right)}} \right\rbrack}}} & (1) \end{matrix}$

wherein max[l(i+6), r(i+τ+6)] means to select the larger of l(i+6) and r(i+τ+6), and τ is varied from −6 to +6.

FIG. 12 shows the change of the correlation C(τ), which becomes smaller as the value τ approaches the phase difference δ. An interpolating calculation is made on the correlations C(3), C(4) and C(5) to calculate C(δ) corresponding to the minimum correlation between C(3) and C(4), and a value τ corresponding to C(δ) with the minimum correlation indicates the phase difference δ. In this manner the phase difference of the image signals L and R can be calculated. The maximum and minimum values of τ and the number of the pixel data are not limited to those in the foregoing embodiment.

In the following there will be explained a method for correcting the phase difference, in case the object image moved in the vertical direction on the CCD, by a hand vibration.

FIGS. 13A and 13B show a case where the camera is inclined downwards by the hand vibration, in a period from the storage of the object image L formed by the light beam transmitted by the left pupil (FIG. 13A) to that of the object image R formed by the light beam transmitted by the right pupil (FIG. 13B), wherein the object image moves upwards as illustrated. In such case, an image signal R_(c), at a position the same as that of the image signal L_(c), looks at a lower position of the object than in the image signal L_(c), thus assuming a different shape. The correlation calculation, based on the image signals of such different shapes, will lead to an erroneous phase difference.

Consequently correlation calculations are conducted between the image signal L_(c) and the image signals R_(a), R_(b), R_(c), R_(d) and R_(e) to obtain minimum correlation values C_(a)(δ), C_(b)(δ), C_(c)(δ), C_(d)(δ) and C_(e)(δ) and phase differences δ_(a), δ_(b), δ_(c), δ_(d), and δ_(e). Among these minimum correlation values C_(a)(δ)-C_(e)(δ), the smallest one indicates the highest correspondence of the two images. Thus the image signals providing the smallest one in the minimum correlations are considered to be obtained from the same portion of the object, and the phase difference in such state can be used to minimize the error resulting from the hand vibration in the vertical direction. Consequently, the movement of the image signal to be employed in the correlation calculation, based on the above-explained analysis, constitutes the basic principle of the correcting method for reducing the error in the focus detection resulting from the hand vibration in the vertical direction.

FIG. 14 shows the plotting of the minimum values C_(a)(δ), C_(b)(δ), C_(c)(δ), C_(d)(δ) and C_(e)(δ) of the correlations between the image signal L_(c) shown in FIG. 13A and the image signals R_(a), R_(b), R_(c), R_(d) and R_(e) shown in FIG. 13B, wherein C_(b)(δ) is smallest because the image signal R_(b) looks at a position the same as that of the image signal L_(c). Consequently, the error caused by the hand vibration in the vertical direction can be significantly reduced by employing the phase difference δ_(b) between the image signals L_(c) and R_(b) for calculating the defocus amount.

In the foregoing embodiment, the correction is made in the pitch of a pixel line of the CCD, but the actual image movement by the hand vibration does not occur in such pitch. Thus, for correction at a higher precision, image signals of a pitch, for example, of 0.5 lines may be generated by interpolation.

FIG. 15 shows a method of generating an image signal R_(ab) of a pitch of 0.5 lines from the image signals R_(a) and R_(b).

The pixel outputs R_(a1)-R_(an) of the image signal R_(a) and those R_(b1)-R_(bn) of the image signal R_(b) are respectively averaged as R_(ab1)-R_(abf) as represented by:

R _(ab1)=(R _(a1) +R _(b1))/2

and

R _(abi)=(R _(ai) +R _(bi))/2 i=1 to n

For a finer interpolation with a pitch smaller than 0.5 lines, the above-mentioned averaging can be replaced by a weighted averaging. In this manner it is rendered possible to achieve finer correction in the vertical direction, thereby improving the accuracy of focus detection.

However, in an object showing small change in shape in the vertical direction (object with a low spatial frequency), the minimum value C(δ) of the correlation does not vary much by the position of the image signal. Also, the value of C(δ) varies to a certain extent by the noise component of the image signal. Consequently, in such case, the image signal at a position where the C(δ) becomes smallest may be of an erroneous position.

Such erroneous judgment may occur in case the difference between the correlation C_(c)(δ) at a position corresponding to the image signal L_(c) and the smallest C_(b)(δ) is smaller than a predetermined value. In such case, shown in FIG. 16, the image signal R_(c) is adopted, and such method cannot improve the precision but can prevent further deterioration of the precision by the adverse effect of the erroneous judgment. This method is particularly effective in case the object has a pattern f diagonal lines, because, in such case, the value C(δ) remains the same irrespective of the position, while the phase difference δ varies significantly depending on the position, whereby the possibility of erroneous judgment is rather high and such erroneous judgment leads to a significant deterioration in the precision of focus detection. Also, in such object, the error in the phase difference caused by the vertical movement behaves similarly as that caused by the horizontal movement, and can be corrected similarly by the method for reducing the error in the horizontal direction, to be explained later.

The vertical moving amount of the image signals L and R, caused by the hand vibration, becomes larger with the focal length of the photographing lens and with the interval of the storages of the image signals L and R. Based on these facts, the size of the calculating area, employed for the correction in the vertical direction, can be selected according to the focal length information of the photographing lens and the interval of storage of the image signals, determined from the image accumulating time and the driving time of the focus detecting light shading board, in order to dispense with the calculation in an unnecessarily wide area, thereby reducing the calculation time. Also, the amount of the image signal to be read can be reduced, thereby decreasing the required memory capacity and reducing the time required for signal read-out.

FIG. 17 is a flow chart of a “shift range calculation” subroutine for setting the calculation area, which is activated at a step 2402 through a step 2401.

At first a step 2402 calculates the image accumulation time TC from the luminance information of the object, then a step 2403 calculates the driving time TD of the focus detecting light shading board 67, and a next step 2404 calculates the interval TA of storage of the image signals as the sum of the above-mentioned accumulation time TC and the drive time TD. A step 2405 detects the focal length FA of the photographing zoom lens by reading a zoom encoder thereof.

A step 2406 discriminates whether the storage interval TA of the image signals is smaller than 10 msec, and, if smaller, the sequence proceeds to a step 2407, but, if not, the sequence proceeds to a step 2412. The step 2407 discriminates whether the focal length FA is smaller than 30 mm, and, if smaller, the sequence proceeds to a step 2410, but, if not, the sequence proceeds to a step 2408. The step 2410 enters 1 as LS in order to set the calculation area so as to include an upper line and a lower line. Then, a step 2808 discriminates whether FA is smaller than 60 mm, and, if smaller, the sequence proceeds to a step 2411, but, if not the sequence proceeds to a step 2409. The step 2411 enters 2 as LS in order to set the calculation area so as to include two upper lines and two lower lines, and the step 2409 enters 3 as LS.

Therefore, if TA is 10 msec and FA<30 mm, there is selected LS=1. If 30 mm≦FA<60 mm, there is selected LS=2, and, if FA≧60 mm, there is selected LS=3. Similarly, in steps 2412 to 2417, if 10 msec≦TA≦20 msec and FA<30 mm, there is selected LS=2. If 30 mm≦FA<60 mm, there is selected LS=4, and, if FA≧60 mm, there is selected LS=5. Similarly, in steps 2418 to 2422, if TA≧20 msec and FA<30 mm, there is selected LS=3. If 30 mm≦FA<60 mm, there is selected LS=5, and, if FA≧60 mm, there is selected LS=6.

The variation of the calculation area LS according to the focal length of the photographing lens and the storage interval of the image signals allows one to dispense with the unnecessary calculation and the unnecessary image signal read-out. The calculation area LS is naturally made smaller (with fewer number of lines) in case of a shorter focal length of the photographing lens or a shorter storage interval of the image signals, which reduces the influence of the hand vibration.

FIG. 18 is a chart showing the principle of eliminating the detection error, caused by the hand vibration, in an assumed case in which the object image moves from left to right at a constant speed because of the hand vibration. It is assumed that the image signals are stored at a constant interval. L₁, R₂ and L₃ indicate the actually stored image signals, and R₁, L₂ and R₃ indicate the other image signals if they are stored at the same timings.

As the object image moves by a distance δ_(m) in the period from the storage of the image signal L₁ to that of the image signal R₂, the phase difference δ₁₂ between the image signals L₁ and R₂ becomes larger than the true phase difference δ₁₁ by δ_(m), so that:

δ₁₂=δ₁₁+δ_(m)  (2)

Also the object image similarly moves by a distance δ_(m) in the period from the storage of the image signal R₂ to that of the image signal L₃, so that the phase difference δ₂₃ between the image signals R₂ and L₃ becomes smaller than the true phase difference δ₁₁ by δ_(m), so that:

δ₂₃=δ₁₁−δ_(m)  (3)

The true phase difference δ₁₁ can be determined from δ₁₂ and δ₂₃ according to the following equation: $\begin{matrix} \begin{matrix} {\delta = {{\left( {\delta_{12} + \delta_{23}} \right)/2}\quad = {\left( {\delta_{11} + \delta_{m} + \delta_{11} - \delta_{m}} \right)/2}}} \\ {\quad {= \delta_{11}}} \end{matrix} & (4) \end{matrix}$

The calculation of the phase difference δ in this manner allows the method to eliminate the error in focus detection, resulting from the object movement of a constant speed, caused by the hand vibration. Since the aforementioned condition stands in case the interval of image signal storages is sufficiently short, this method is very effective when the driving speed of the focus detecting light shading board 67 is fast and the image accumulation time is short.

In the foregoing description, it is assumed that the time required for driving the focus detecting light shading board 67 from the right pupil to the left pupil of the focus detecting diaphragm 65 is equal to that from the left pupil to the right pupil and that the image accumulation time of the CCD remains the same for all the three image signals, so that the storages of the image signals are realized with the same interval, but there may be a fluctuation in the driving time of the focus detecting light shading board 67 or in the image accumulation time. In the following there will be explained, therefore, a calculation method in case the interval of the storages of the image signals is varied.

FIG. 19 shows the relationship between the image signal storage time and the position of the object image, wherein T₁₂ is the interval of the storages of the image signals L₁ and R₂, T₂₃ is the interval of the storages of the image signals R₂ and L₃, and δ₁₂ and δ₂₃ are respectively the phase differences between L₁ and R₂ and between R₂ and L₃.

The inclination of a solid line, representing the image signals L is indicated by:

(δ₂₃−δ₁₂)/(T ₁₂ +T ₂₃)

and the phase difference between L₁ and L₂ is represented by:

 T ₁₂(δ₂₃−δ₁₂)/(T ₁₂ +T ₂₃)

Also the phase difference δ between L₂ and R₂ is represented by: $\begin{matrix} {\delta = {{\frac{T_{12}\left( {\delta_{23} - \delta_{12}} \right)}{T_{12} + T_{23}} + \delta_{12}} = \frac{{T_{12} \cdot \delta_{23}} + {T_{23} \cdot \delta_{12}}}{T_{12} + T_{23}}}} & (5) \end{matrix}$

corresponding to a weighted average by the intervals T₁₂ and T₂₃.

In the following there will be explained the function of the auto focusing device of the camera of the above-explained configuration, with reference to the appended flow charts.

FIG. 20 is a flow chart showing the main control sequence of the entire camera. When a power switch is turned on to activate the various circuits, the sequence proceeds from a step 001 to a step 002 to execute display on the view finder. More specifically, the image signal is stored by the CCD and displayed on the electronic view finder (EVF) after various signal processings. A next step 003 detects the state of a switch SW1 which is to be turned on by the depression by a first stroke of a shutter release button, and, if it is off, the sequence proceeds to a step 004 to initialize a flag JF for detecting the state of the focusing. If the switch SW1 is on, the sequence proceeds to a step 005.

A step 005 calculates the luminance of the object, based on the output of the image signal stored by the CCD, the gain of the signal processing circuit, the image accumulation time of the CCD and the F-number of the photographing lens. A next step 006 calculates the appropriate shutter speed (exposure time) and aperture stop (F-value), based on the calculated object luminance, the photographing mode of the camera and the exposure correcting information, and stores thus calculated values in a predetermined memory area. At the shutter releasing operation to be explained later, the shutter and the diaphragm are controlled according to the data thus stored in the memory area.

A next step 007 discriminates the state of the flag JF for detecting the state of focusing. If JF=1, indicating that the focusing is already completed and the photographing lens is in the in-focus state, the sequence proceeds to a step 012, but, if JF=0, indicating that the in-focus state is not yet reached, the sequence proceeds to a step 008 for effecting the focusing operation.

A step 008 is a “focus detection” subroutine for detecting the defocus amount of the photographing lens, which will be explained later in detail. A next step 009 compares the defocus amount detected in the step 008 with a permissible defocus amount determined from the diameter of a permissible fluctuation circle and the F-number of the photographing lens, and, if the former is smaller, indicating an in-focus state, the sequence proceeds to a step 010 to enter 1 in the flag JF thereby memorizing the in-focus state, and then the sequence proceeds to a step 012.

On the other hand, if the step 009 identifies that the in-focus state has not been reached, a step 011 executes the focusing operation by driving the focusing lens group of the photographing lens so as to cancel the defocus amount detected in the foregoing step 008, and then the sequence returns to the step 002.

In this manner, the focusing operation is repeated until the in-focus state is reached or the switch SW1 is turned off.

When the in-focus state is reached, a step 012 discriminates the state of a switch SW2 which is to be turned on by the depression of the shutter release button by a second stroke, and, if it is off, the sequence returns to the step 002, but, if it is on, the sequence proceeds to a step 013 for effecting the shutter releasing operation.

A step 013 controls the lens diaphragm to a diaphragm value calculated in the step 006, and a next step 014 closes the shutter, resets the charges in the CCD and controls the shutter with the shutter time calculated in the step 006, thereby executing the exposure operation of the CCD. A next step 015 drives the CCD to release the image signal and applies a predetermined signal processing thereon. A next step 016 executes a compression process, and the compressed image signal is stored in the memory medium in a step 017.

A step 018 opens the shutter to restore the initial state, and then the sequence returns to the step 002.

In the following there will be given an explanation of the “focus detection” subroutine, with reference to a flow chart shown in FIG. 29.

When the focus detection subroutine is called in the step 008 in FIG. 20, the sequence proceeds, through a step 101, to a step 102.

A step 102 moves the focus detecting diaphragm 65, which has been in a state shown in FIG. 7A, into the optical path of the photographing lens, and a next step 103 moves the focus detecting light shading board 67, which has been in a state shown in FIG. 7A, into the optical path of the photographing lens. After the steps 102 and 103, the focus detecting diaphragm 65 and the focus detecting light shading board 67 are shifted to a state shown in FIG. 7B, whereby the light beam transmitted by the left aperture 65 a of the diaphragm 65 alone is focused on the CCD.

A step 104 executes the image accumulation in the CCD, and a next step 105 reads the image signal L₁ accumulated in the step 104 and stores it in a predetermined memory area. Different from the ordinary read-out operation, the read-out operation of the image signal L₁ is executed only in an area necessary for the focus detection and the image signal in the unnecessary areas is discarded at a high speed as explained in the foregoing, whereby the reduction in the image signal read-out time can be realized.

A next step 106 moves again the focus detecting light shading board 67 to a state shown in FIG. 7C, whereby the light beam transmitted by the right aperture 65 b of the diaphragm 65 alone is focused on the CCD. A next step 107 executes the image accumulation as in the foregoing step 104, and a step 108 reads and stores the image signal R₂ in a predetermined memory area, as in the foregoing step 105.

A next step 109 moves again the focus detecting light shading board 67 to a state shown in FIG. 7B, whereby the light beam transmitted by the left aperture 65 a of the diaphragm 65 alone is focused on the CCD. Then, a next step 110 executes the image accumulation, and a step 111 reads and stores the image signal L₃ in a predetermined memory area.

A step 112 retracts the focus detecting diaphragm 65, and a step 113 retracts the focus detecting light shading board 67. After the steps 112 and 113, there is restored the initial state shown in FIG. 7A.

A step 114 is a “defocus amount calculation” subroutine, which calculates the defocus amount of the photographing lens, based on the image signals L₁, R₂ and L₃, as will be explained later in more details. After the step 114, the “focus detection” subroutine is terminated in a step 115.

The image accumulating operations in the aforementioned steps 104, 107 and 110 may be executed with the same accumulation time and the same gain to equalize the output levels of the image signals, thereby increasing the correlation in the correlation calculation and obtaining a high and stable accuracy of the detection.

In the following there will be explained the details of the “defocus amount calculation” subroutine, with reference to a flow chart shown in FIG. 22.

When the “defocus amount calculation” subroutine is called in the step 114 in FIG. 21, the sequence proceeds, through a step 201, to a step 202.

A step 202 calculates the phase difference δ₁₂ of the image signals L₁ and R₂, then a step 203 similarly calculates the phase difference δ₂₃ of the image signals R₂ and L₃, and a step 204 calculates the final phase difference δ not containing the detection error resulting from the constant-speed hand vibration component, according to the following calculation:

δ=(δ₁₂+δ₂₃)/2  (6)

A next step 205 calculates the defocus amount DF of the photographing lens, based on the phase difference δ determined in the foregoing step 204, the sensitivity K of the focus detection system, determined by the focus detecting diaphragm and the photographing optical system, and the pixel pitch P of the CCD, according to the following formula:

DF=δ·K·P  (7)

After the step 205, the present subroutine is terminated by a step 206.

In the following there will be explained another case in which the interval of the image signal storages varies because of the variation of the driving time of the focus detecting light shading board 67. The following explanation will be concentrated on the differences in the focus detecting method, as the configuration of the camera and the control sequence therefor are same as those explained in the foregoing.

FIG. 23 shows a flow chart of the “focus detection” subroutine. When it is called in the step 008 in FIG. 20, the sequence proceeds to a step 302 through a step 301.

Steps 302 and 303 drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7B as in the steps 102 and 103 in FIG. 20, thereby preparing for the focus detecting operation.

A next step 304 memorizes the starting time of the image accumulating operation for the image signal L₁, by storing the count TIMER of a self-running timer of the system control unit in a RAM memory area T₁. A next step 305 executes the accumulation of the image signal L₁, and a step 306 executes the read-out thereof.

Then, a step 307 moves the light shading board 67 to a state shown in FIG. 7C, and a next step 308 memorizes the starting time of the accumulation of the image signal R₂, by storing the timer count TIMER in a memory area T₂. Then steps 309, 310 execute the accumulation and the read-out of the image signal R₂.

Then, a step 311 moves the light shading board 67 to a state shown in FIG. 7B, and a next step 312 memorizes the starting time of the accumulation of the image signal L₃, by storing the timer count TIMER in a memory area T₃. Then steps 313, 314 execute the accumulation and the read-out of the image signal L₃.

Steps 315 and 316 retract the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7A, and a step 317 calculates the defocus amount. Then a step 318 terminates the present subroutine.

Now the calculation method for the defocus amount will be explained with reference to FIG. 24, which shows a “defocus amount calculation” subroutine to be used in case the interval of the image signal storages varies. When this subroutine is called in the step 317 in FIG. 23, the sequence proceeds to a step 402 through a step 401.

A step 402 calculates the interval T₁₂ of the starts of accumulations of the image signals L₁ and R₂, and a step 403 similarly calculates the interval T₂₃ of the starts of accumulations of the image signals R₂ and L₃. Then a step 404 calculates the phase difference δ₁₂ of the image signals L₁ and R₂ by correlation calculation, and a step 405 similarly calculates the phase difference δ₂₃ of the image signals R₂ and L₃.

A step 406 calculates the final phase difference δ by eliminating the detection error resulting from the constant-speed movement of the optical image based on the phase differences δ₁₂, δ₂₃ and the intervals T₁₂, T₂₃, according to the following formula: $\begin{matrix} {\delta = \frac{{T_{23} \cdot \delta_{12}} + {T_{12} \cdot \delta_{23}}}{T_{12} + T_{23}}} & (8) \end{matrix}$

A next step 407 calculates the defocus amount DF of the photographing lens, based on the phase difference δ determined in the foregoing step 406, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. After this step, the present subroutine is terminated by a step 408.

In case the interval of the start of the charge accumulating operations varies, there are required a memory for measuring the interval and a complex calculation, as explained above. Consequently it is desirable to maintain the interval to be constant, whereby the calculation process can be simplified and executed within a shorter time, with a reduced memory capacity.

More specifically, if the driving time for the focus detecting light shading board 67 fluctuates to a certain extent but if the upper limit for such driving time is known, the start of the charge accumulating operation can wait until the lapse of such upper limit time even after the driving of the light shading board is completed, as long as the driving time is sufficiently short. It is, therefore, possible to maintain a constant interval of the starts of the accumulating operations, in such case, by employing the same accumulating time, thereby easily simplifying the calculation process. Also, the presence of a timer for stabilizing the interval of the starts of the charge accumulating operations provides an advantage of dispensing with the means for detecting the completion of driving of the focus detecting light shading board 67.

Second Embodiment

In a second embodiment of the present invention, four image signals are stored time-sequentially, in order to eliminate the detection error, caused by a constant-acceleration movement of the optical image resulting from the hand vibration or from the movement of the object.

FIG. 25 shows the principle of elimination, in the present embodiment, of the detection error resulting from the hand vibration, wherein the object image is assumed to move from left to right at a constant acceleration caused by the hand vibration, and it is also assumed that the image signals are stored at a constant interval.

L₁, R₂, L₃ and R₄ indicate the actually stored image signals, and R₁, L₂, R₃ and L₄ indicate the other image signals if they are stored at the same timings.

The object image moves by a distance δ_(m1) in the period from the storage of the image signal L₁ to that of the image signal R₂, and the object image moves by a distance δ_(m2) in the period from the storage of the image signal R₂ to that of the image signal L₃, with a relationship δ_(m1)<δ_(m2). Therefore, as in the foregoing second embodiment, the phase difference δ₁ determined from the image signals L₁, R₂ and L₃ becomes smaller than the true phase difference δ₁₁ by δ_(d1), as indicated by:

δ₁=(δ₁₂+δ₂₃)/2=δ₁₁−δ_(d1)  (9)

This error δ_(d1) results from the variation in the speed, induced by the acceleration.

Also the phase difference δ₂ determined from the image signals R₂, L₃ and R₄ as in the foregoing second embodiment, wherein δ_(m2)<δ_(m3), becomes larger than the true phase difference δ₁₁ by δ_(d2) as indicated by:

 δ₂=(δ₂₃+δ₃₄)/2=δ₁₁+δ_(d2)  (10)

In case of the movement with a constant acceleration, there stands a relation:

δ_(d1)=δ_(d2)  (11)

the phase difference δ after the elimination of the detection errors δ_(d1), δ_(d2) is given by: $\begin{matrix} \begin{matrix} {\delta = {{\left( {\delta_{1} + \delta_{2}} \right)/2} = \quad {\left( {\delta_{11} - \delta_{d1} + \delta_{11} + \delta_{d2}} \right)/2}}} \\ {= \quad \delta_{11}} \end{matrix} & (12) \\ {\text{~~~~~~~~} = {\left( {\delta_{12} + {2\delta_{23}} + \delta_{34}} \right)/4}} & (13) \end{matrix}$

In this manner it is rendered possible to eliminate the detection errors caused by the constant-acceleration movement, utilizing the phase differences δ₁₂, δ₂₃ and δ₃₄ determined from the four image signals L₁, R₂, L₃ and R₄, thereby significantly improving the precision of the focus detection.

In the following there will be explained a calculation method for the phase difference δ in case the interval of image signal storages fluctuates.

For an interval T₁₂ from the storage of the image signal L₁ to that of the image signal R₂, an interval T₂₃ from the storage of the image signal R₂ to that of the image signal L₃ and an interval T₃₄ from the storage of the image signal L₃ to that of the image signal R₄, the phase differences δ₁, δ₂ are given by the following formulas as in the second embodiment: $\begin{matrix} {\delta_{1} = \frac{{T_{23} \cdot \delta_{12}} + {T_{12} \cdot \delta_{23}}}{T_{12} + T_{23}}} & (14) \end{matrix}$

$\begin{matrix} {\delta_{2} = \frac{{T_{34} \cdot \delta_{23}} + {T_{23} \cdot \delta_{34}}}{T_{23} + T_{34}}} & (15) \end{matrix}$

Also the phase difference δ is given by: $\begin{matrix} {\delta = \frac{{\left( {T_{23} + T_{34}} \right) \cdot \delta_{1}} + {\left( {T_{12} + T_{23}} \right) \cdot \delta_{2}}}{T_{12} - {2T_{23}} + T_{34}}} & (16) \\ {= \frac{{\frac{{T_{23} \cdot \delta_{12}} + {T_{12} \cdot \delta_{23}}}{T_{12} + T_{23}}\left( {T_{23} + T_{34}} \right)} + {\frac{{T_{34} \cdot \delta_{23}} + {T_{23} \cdot \delta_{34}}}{T_{23} + T_{34}}\left( {T_{12} + T_{23}} \right)}}{T_{12} + {2T_{23}} + T_{34}}} & (17) \end{matrix}$

Assuming that the time required for moving the focus detecting light shading board 67 is constant and that the charge accumulation time also remains constant within a single focus detecting operation, there stands a relation:

T ₁₂ =T ₃₄  (18)

so that the foregoing formula can be transformed as: $\begin{matrix} {\delta = \frac{{T_{23}\left( {\delta_{12} + \delta_{23}} \right)} + {2 \cdot T_{12} \cdot \delta_{23}}}{2\left( {T_{12} + T_{23}} \right)}} & (19) \end{matrix}$

In this manner the calculation can be significantly simplified by giving a regularity to the intervals of the image signal storages.

The configuration of the camera and principal operations thereof in the present second embodiment are the same as those in the foregoing first embodiment and will not, therefore, be explained. In the following there will be given an explanation on the differences, from the foregoing first embodiment, in the focus detecting operation.

FIG. 26 shows a flow chart of a “focus detection” subroutine in case the interval of the image signal storages always varies. When this subroutine is called, the sequence proceeds, through a step 501, to a step 502.

Steps 502 and 503 drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7B, thereby preparing for the focus detecting operation.

A next step 504 memorizes the starting time of the charge accumulating operation for the image signal L₁, by storing the count TIMER of a self-running timer of the system control unit in a RAM memory area T₁. A next step 505 executes the accumulation of the image signal L₁, and a step 506 executes the read-out thereof.

Then a step 507 moves the light shading board 67 to a state shown in FIG. 7C.

A next step 508 memorizes the starting time of the accumulation of the image signal R₂, by storing the timer count TIMER in a memory area T₂. Then a step 509 executes the accumulation of the image signal R₂, and a step 510 executes the read-out of the image signal R₂.

Then a step 511 moves the light shading board 67 to a state shown in FIG. 7B, then a step 512 memorizes the starting time of the accumulation of the image signal L₃, by storing the timer count TIMER in a memory area T₃, a step 513 executes the accumulation of the image signal L₃, and a step 514 executes the read-out of the image signal L₃.

Then a step 515 moves the light shading board 67 to a state shown in FIG. 7C, then a step 516 memorizes the starting time of the accumulation of the image signal R₄, by storing the timer count TIMER in a memory area T₄, a step 517 executes the accumulation of the image signal R₄, and a step 518 executes the read-out of the image signal R₄.

Then steps 519, 520 drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7A. A next step 521 calculates the defocus amount, and a step 522 terminates the present subroutine.

Now, the calculation method for the defocus amount will be explained in detail with reference to FIG. 27, which shows a “defocus amount calculation” subroutine. When this subroutine is called in the step 521 in FIG. 26, the sequence proceeds to a step 602 through a step 601.

A step 602 calculates the interval T₁₂ of the starts of accumulations of the image signals L₁ and R₂, then a step 603 similarly calculates the interval T₂₃ of the starts of accumulations of the image signals R₂ and L₃, and a step 604 calculates the interval T₃₄ of the starts of accumulations of the image signals L₃ and R₄.

Then a step 605 calculates the phase difference δ₁₂ of the image signals L₁ and R₂ by correlation calculation, then a step 606 similarly calculates the phase difference δ₂₃ of the image signals R₂ and L₃, and a step 607 calculates the phase difference δ₃₄ of the image signals L₃ and R₄.

Steps 608, 609 calculate the phase differences δ_(d1), δ_(d2) by eliminating the error of the constant-speed component, and a step 610 calculates the phase difference δ by eliminating the error of the constant-acceleration component. A next step 611 calculates the defocus amount DF of the photographing lens, based on the phase difference δ after the elimination of the error of the constant-acceleration component, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 612.

In the foregoing, there has been explained the principle of focus detection, in case the interval of the starts of charge accumulating operations varies.

In the following there will be explained a case in which the driving time required for the focus detecting light shading board 67 is different in the different driving directions but is substantially the same in the same driving direction, namely in a situation where the intervals of the starts of the charge accumulating operations have certain regularity in such a manner that the interval from the start of accumulation of an image signal L to that of accumulation of an image signal R is constant within a single focus detecting operation and also the interval from the start of accumulation of an image signal R to that of accumulation of an image signal L is constant within a single focus detecting operation but, with a single focus detecting operation, the interval from the start of accumulation of an image signal L to that of accumulation of an image signal R is different from the interval from the start of accumulation of an image signal R to that of accumulation of an image signal L, as represented by:

T ₁₂ =T ₃₄ , T ₁₂ ≠T ₂₃  (20)

according to the form of the foregoing embodiments.

FIG. 28 is a flow chart showing the focus detecting subroutine in case the above-explained regularity is present in the intervals of the starts of the charge accumulating operations. This flow chart will not be explained further as it is the same as the flow chart shown in FIG. 26, except that the start time T₄ for the accumulation of the image signal R₄ is unnecessary and is not, therefore, measured.

When a “defocus amount calculation” subroutine is called in a step 720, the sequence proceeds to a step 802 through a step 801.

A step 802 calculates the interval T₁₂ of the starts of accumulations of the image signals L₁ and R₂, and a step 803 calculates the interval T₂₃ of the starts of accumulations of the image signals R₂ and L₃.

Then steps 804 to 806 calculate the phase differences δ₁₂, δ₂₃ and δ₃₄ similarly to the steps 605 to 607 in FIG. 34, then a step 807 calculates the phase difference δ, and a step 808 calculates the defocus amount DF of the photographing lens, based on the phase difference δ, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 809.

In the foregoing, there has been explained the focus detecting operation, in case the intervals of the starts of charge accumulations have a certain regularity. Such regularity in the intervals allows the device to simplify the calculation of the phase difference δ in comparison with the case of absence of such regularity, with advantages of a reduced memory capacity and a reduced calculation time.

In the following there will be explained the focus detecting operation in case the intervals of the starts of the charge accumulations are constant within a single focus detecting operation.

FIG. 30 is a flow chart of the focus detection subroutine in case the intervals of the starts of the charge accumulations are constant. This flow chart will not be explained in detail, since it is similar to that shown in FIG. 26, except that the accumulation starting times are not read because the measurement of the intervals is not necessary. In other parts, the driving of the focus detecting diaphragm 65 and the focus detecting light shading board 67 and the accumulation and read-out of the image signals L₁, R₂, L₃ and R₄ are executed in a similar manner as in the flow chart shown in FIG. 26.

When a “defocus amount calculation” subroutine is called in a step 917, the sequence proceeds, through a step 1001, to a step 1002 to execute the “defocus amount calculation” subroutine.

Steps 1002 to 1004 calculate the phase differences δ₁₂, δ₂₃ and δ₃₄ by correlation calculations similar to those in the steps 605 to 607 in FIG. 26, then a step 1005 calculates the phase difference δ by eliminating the error caused by the constant-acceleration movement, and a step 1006 calculates the defocus amount DF, based on the phase difference δ, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 1007.

In the foregoing, there has been explained the focus detecting operation in case the intervals of the starts of charge accumulations are constant. The calculation of the phase difference δ not including the error resulting from the constant-acceleration movement can be further simplified, with the advantages of reducing the memory capacity and the calculation time and dispensing with the necessity of memorizing the starting times of the charge accumulations.

The intervals of the starts of image accumulations can be given a regularity or made constant by providing a stabilizing timer which starts the image accumulating operation after the lapse of a predetermined time even if the driving of the focus detecting light shading board 67 is completed within a short time. The expiration time of such stabilizing timer need only be longer than the maximum driving time. Also the presence of such stabilizing timer allows the device to dispense with detection means for detecting the completion of driving of the light shading board 67.

Third Embodiment

In a third embodiment of the present invention, five image signals are time-sequentially stored, and the movement of the optical image, caused by the hand vibration or the movement of the object, is approximated by a second-order function thereby reducing the error in focus detection resulting from such movement.

FIG. 32 is a chart showing the error reducing method of the present third embodiment, wherein the object position y is represented in the ordinate, as a function of time t in the abscissa. The camera stores image signal L₁, R₂, L₃, R₄ and L₅ in a time-sequential manner, while alternately switching the pupils. It is assumed that the movement of the object image in a period from the storage of the image signal L₁ to that of the image signal L₅ can be approximated by a second-order function. There is determined a second-order function:

y=At+Bt ²

passing through the positions of the image signals L₁, L₃ and L₅, then the positions of imaginary image functions L₂, L₄ are determined by an interpolation utilizing such second-order function, and the average of the phase difference between L₂ and R₂ and that between L₄ and R₄ is adopted as the final target phase difference δ.

This calculation method will be explained in the following.

Assuming that the image signal L₁ has a position y₁ and a time t₁, the image signal L₃ has y₃ and t₃ and the image signal L₅ has y₅ and t₅, and for an initial condition of y₁=0 and t₁=0, the second-order function:

y=At+Bt ²

can be rewritten as:

y ₃ =At ₃ +Bt ₃ ²  (21)

y ₅ =At ₅ +Bt ₅ ²  (22)

From these two equations, the coefficients A and B can be determined as follows: $\begin{matrix} {A = \frac{{y_{5}t_{3}^{2}} - {y_{3}t_{5}^{2}}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}}} & (23) \\ {B = \frac{{y_{3}t_{5}} - {y_{5}t_{3}}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}}} & (24) \end{matrix}$

Also the positions y₂, y₄ of the imaginary image signals L₂, L₄ can be given as follows: $\begin{matrix} {y_{2} = {{At}_{2} + {Bt}_{2}^{2}}} & (25) \\ {\text{~~~~} = {\frac{\left( {{y_{5}t_{3}^{2}} - {y_{3}t_{5}^{2}}} \right)t_{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} + \frac{\left( {{y_{3}t_{5}} - {y_{5}t_{3}}} \right)t_{2}^{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}}}} & (26) \\ {y_{4} = {{At}_{4} + {Bt}_{4}^{2}}} & (27) \\ {\text{~~~~} = {\frac{\left( {{y_{5}t_{3}^{2}} - {y_{3}t_{5}^{2}}} \right)t_{4}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} + \frac{\left( {{y_{3}t_{5}} - {y_{5}t_{3}}} \right)t_{4}^{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}}}} & (28) \end{matrix}$

Thus, the phase difference δ₂₂ between the imaginary image signal L₂ and the image signal R₂ is given by: $\begin{matrix} {\delta_{22} = {y_{2} - y_{2}^{\prime}}} & (29) \\ {\text{~~~~~} = {\frac{\left( {{y_{5}t_{3}^{2}} - {y_{3}t_{5}^{2}}} \right)t_{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} + \frac{\left( {{y_{3}t_{5}} - {y_{5}t_{3}}} \right)t_{2}^{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} - y_{2}}} & (30) \end{matrix}$

Also, the phase difference δ₄₄ between the imaginary image signal L₄ and the image signal R₄ is given by: $\begin{matrix} {\delta_{44} = {y_{4} - y_{4}^{\prime}}} & (31) \\ {\text{~~~~~} = {\frac{\left( {{y_{5}t_{3}^{2}} - {y_{3}t_{5}^{2}}} \right)t_{4}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} + \frac{\left( {{y_{3}t_{5}} - {y_{5}t_{3}}} \right)t_{4}^{2}}{t_{3}{t_{5}\left( {t_{3} - t_{5}} \right)}} - y_{4}}} & (32) \end{matrix}$

since

t ₁=0, y _(b) =0   (33)

there can be determined:

t ₂ =T ₁₂ , y ₂′=−δ₁₂  (34)

t ₃ =T ₁₂ +T ₂₃ , y ₃=−δ₁₂+δ₂₃  (35)

t ₄ =T ₁₂ +T ₂₃ +T ₃₄ , y ₄′=−δ₁₂+δ₂₃−δ₃₄  (36)

t ₅ =T ₁₂ +T ₂₃ +T ₃₄ +T ₄₅ , y ₅=−δ₁₂+δ₂₃−δ₃₄+δ₄₅  (37)

wherein δ₁₂ indicates the phase difference between the image signals L₁ and R₂, δ₂₃ indicates the phase difference between the image signals R₂ and L₃, δ₃₄ indicates the phase difference between the image signals L₃ and R₄, and δ₄₅ indicates the phase difference between the image signals R₄ and L₅.

By substituting the relations (34) to (37) into the equations (23) and (24), there are obtained: $\begin{matrix} {A = \frac{\begin{matrix} {{\left( {{- \delta_{12}} + \delta_{23} - \delta_{34} + \delta_{45}} \right)\left( {T_{12} + T_{23}} \right)^{2}} -} \\ {\left( {{- \delta_{12}} + \delta_{23}} \right)\left( {T_{12} + T_{23} + T_{34} + T_{45}} \right)^{2}} \end{matrix}}{\left( {T_{12} + T_{23}} \right)\left( {T_{12} + T_{23} + T_{34} + T_{45}} \right)\left( {{- T_{34}} - T_{45}} \right)}} & (38) \\ {B = \frac{\begin{matrix} {{\left( {{- \delta_{12}} + \delta_{23}} \right)\left( {T_{12} + T_{23} + T_{34} + T_{45}} \right)} -} \\ {\left( {{- \delta_{12}} + \delta_{23} - \delta_{34} + \delta_{45}} \right)\left( {T_{12} + T_{23}} \right)} \end{matrix}}{\left( {T_{12} + T_{23}} \right)\left( {T_{12} + T_{23} + T_{34} + T_{45}} \right)\left( {{- T_{34}} - T_{45}} \right)}} & (39) \end{matrix}$

Also δ₂₂ and δ₄₄ are given by:

δ₂₂ =A·T ₁₂ +B·T ₁₂ ²+δ₁₂  (40)

δ₄₄ =A·(T ₁₂ +T ₂₃ +T ₃₄)+B·(T ₁₂ +T ₂₃ +T ₃₄)²+δ₁₂−δ₂₃+δ₃₄  (41)

The finally desired phase difference δ, being the average of δ₂₂ and δ₄₄, is represented by: $\begin{matrix} {\delta = \frac{\delta_{22} + \delta_{44}}{2}} & (42) \\ {\text{~~} = \frac{\begin{matrix} {{A \cdot \left( {{2 \cdot T_{12}} + T_{23} + T_{34}} \right)} + {B \cdot}} \\ {\left( {T_{12}^{2} + \left( {T_{12} + T_{23} + T_{34}} \right)^{2}} \right) + {2 \cdot \delta_{12}} - \delta_{23} + \delta_{34}} \end{matrix}}{2}} & (43) \end{matrix}$

The foregoing shows the calculation method for the phase difference δ, in case the intervals of the image signal storages constantly vary.

In case the time required for moving the focus detecting light shading board 67 in the same direction is always constant and the image accumulation times remains the same during a single focus detecting operation, there are obtained:

T ₁₂ =T ₃₄ , T ₂₃ =T ₄₅  (44)

By substituting these conditions into the equations (38), (39) and (40), there are obtained: $\begin{matrix} {A = \frac{{{- 3} \cdot \delta_{12}} + {3 \cdot \delta_{23}} + \delta_{34} - \delta_{45}}{2\left( {T_{12} + T_{23}} \right)}} & (45) \\ {B = \frac{\delta_{12} - \delta_{23} - \delta_{34} + \delta_{45}}{2\left( {T_{12} + T_{23}} \right)^{2}}} & (46) \\ {\delta = \frac{\begin{matrix} {{A \cdot \left( {{3 \cdot T_{12}} + T_{23}} \right)} + {B \cdot}} \\ {\left( {T_{12}^{2} + \left( {{2 \cdot T_{12}} + T_{23}} \right)^{2}} \right) + {2 \cdot \delta_{12}} - \delta_{23} + \delta_{34}} \end{matrix}}{2}} & (47) \end{matrix}$

The foregoing shows the calculation method for the phase difference δ in case the intervals of the image signal storages have regularity.

In the following, there will be explained the calculation method for the phase difference δ in case the intervals of the image signal storages remain constant within a single focus detecting operation. Under such condition, there are obtained:

T ₁₂ =T ₂₃ =T ₃₄ =T ₄₅  (48)

so that: $\begin{matrix} {A = \frac{{{- 3} \cdot \delta_{12}} + {3 \cdot \delta_{23}} + \delta_{34} - \delta_{45}}{4 \cdot T_{12}}} & (49) \\ {B = \frac{\delta_{12} - \delta_{23} - \delta_{34} + \delta_{45}}{8 \cdot T_{12}^{2}}} & (50) \\ {\delta = \frac{{4 \cdot A \cdot T_{12}} + {10 \cdot B \cdot T_{12}^{2}} + {2 \cdot \delta_{12}} - \delta_{23} + \delta_{34}}{2}} & (51) \\ {\text{~~} = \frac{\begin{matrix} {{4\left( {{{- 3} \cdot \delta_{12}} + {3 \cdot \delta_{23}} + \delta_{34} - \delta_{45}} \right)} +} \\ {{5\left( {\delta_{12} - \delta_{23} - \delta_{34} + \delta_{45}} \right)} + {4\left( {{2 \cdot \delta_{12}} - \delta_{23} + \delta_{34}} \right)}} \end{matrix}}{8}} & (52) \\ {\text{~~} = \frac{\delta_{12} + {3 \cdot \delta_{23}} + {3 \cdot \delta_{34}} + \delta_{45}}{8}} & (53) \end{matrix}$

Thus, the calculation formulas can be significantly simplified by giving regularity to the intervals of the image signal storages or selecting such intervals at the same value.

The configuration of the camera of the present third embodiment and the main control sequence will not be explained as they are same as those of the foregoing first embodiment, and, in the following, there will be explained the differences from the foregoing first and second embodiments in the focus detecting operation.

FIG. 33 is a flow chart showing the focus detection subroutine in case the intervals of the image signal storages vary constantly. When this subroutine is called, the sequence proceeds, through a step 1101, to a step 1102.

Steps 1102 and 1103 respectively drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7B.

A next step 1104 memorizes the starting time of the charge accumulating operation for the image signal L₁, by storing the count TIMER of a self-running timer of the system control unit in a RAM memory area T₁. A next step 1105 executes the accumulation of the image signal L₁, and a step 1106 executes the read-out thereof.

Then, a step 1107 moves the light shading board 67 to the state shown in FIG. 7C. A next step 1108 memorizes the starting time of the accumulation of the image signal R₂, by storing the timer count TIMER in a memory area T₂. Then a step 1109 executes the accumulation of the image signal R₂, and a step 1110 executes the read-out of the image signal R₂.

Then, a step 1111 moves the light shading board 67 to a state shown in FIG. 7B, then a step 1112 memorizes the starting time of the accumulation of the image signal L₃, by storing the timer count TIMER in a memory area T₃, a step 1113 executes the accumulation of the image signal L₃, and a step 1114 executes the read-out of the image signal L₃.

Then, a step 1115 moves the light shading board 67 to a state shown in FIG. 7C, then a step 1116 memorizes the starting time of the accumulation of the image signal R₄, by storing the timer count TIMER in a memory area T₄, a step 1117 executes the accumulation of the image signal R₄, and a step 1118 executes the read-out of the image signal R₄.

Then, a step 1119 moves the light shading board 67 to the state shown in FIG. 7B, then a step 1120 memorizes the starting time of the accumulation of the image signal L₅, by storing the timer count TIMER in a memory area T₅, a step 1121 executes the accumulation of the image signal L₅, and a step 1122 executes the read-out of the image signal L₅.

Then, steps 1123, 1124 drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to a state shown in FIG. 7A. A next step 1125 calculates the defocus amount, and a step 1126 terminates the present subroutine.

In the following there will be explained the calculation method for the defocus amount, with reference to FIG. 34, which shows a “defocus amount calculation” subroutine. When this subroutine is called in the step 1125 in FIG. 33, the sequence proceeds to a step 1202 through a step 1201.

Steps 1202 to 1205 calculate the intervals T₁₂, T₂₃, T₃₄, T₄₅ of the starts of accumulations of the image signals, then steps 1206 to 1209 calculate the phase differences δ₁₂, δ₂₃, δ₃₄, δ₄₅ of the image signals by correlation calculation. Then a step 1210 calculates the coefficient A of the first-order term of the second-order function, and a step 1211 calculates the coefficient B of the second-order term. A next step 1212 calculates the phase difference δ, by the approximation with the second-order function, and a step 1213 calculates the defocus amount DF of the photographing lens, based on the phase difference δ, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 1214.

In the foregoing there has been explained the focus detecting operation in case the intervals of the start times of the image accumulations vary.

In the following there will be explained a case in which the driving time required for the focus detecting light shading board 67 is different in the different driving directions but is constant in the same driving direction, namely in a situation where the intervals of the starts of the image accumulating operations have certain regularity in such a manner the intervals T₁₂, T₃₄ from the start of accumulation of an image signal L to that of accumulation of an image signal R are same and also the intervals T₂₃, T₄₅ from the start of accumulation of an image signal R to that of accumulation of an image signal L are the same but the interval from the start of accumulation of an image signal L to that of accumulation of an image signal R is different from the interval from the start of accumulation of an image signal R to that of accumulation of an image signal L, as represented by:

T₁₂ =T ₃₄ , T ₂₃ =T ₄₅ , T ₁₂ ≠T ₂₃  (54)

FIG. 35 is a flow chart showing the focus detecting subroutine in case the above-explained regularity is present in the intervals of the starts of the charge accumulating operations. This flow chart will not be explained further as it is the same as the flow chart shown in FIG. 33, except that the start times T₄, T₅ for the accumulation of the image signals R₄, R₅ are unnecessary and are not, therefore, measured.

When the “defocus amount calculation” subroutine is called in a step 1324, the sequence proceeds to a step 1402 through a step 1401.

A step 1402 calculates the interval T₁₂ of the starts of accumulations of the image signals L₁ and R₂, and a step 1403 calculates the interval T₂₃ of the starts of accumulations of the image signals R₂ and L₃. Then steps 1404 to 1407 calculate the phase differences δ₁₂, δ₂₃, δ₃₄ and δ₄₅ similarly to the steps 1206 to 1209 in FIG. 34, then a step 1408 calculates the coefficient A of the first-order term of the second-order function, and a step 1409 calculates the coefficient B of the second-order term.

A step 1410 calculates the phase difference δ determined by the approximation with the second-order function, and a step 1411 calculates the defocus amount DF of the photographing lens, based on the phase difference δ, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 1412.

In the foregoing, there has been explained the focus detecting operation, in case the intervals of the starts of image accumulations have a certain regularity. Such regularity in the intervals allows simplification of the calculation of the phase difference δ in comparison with the case of absence of such regularity, with advantages of a reduced memory capacity and a reduced calculation time.

In the following there will be explained the focus detecting operation in case the intervals of the starts of the image accumulations are constant within a single focus detecting operation.

FIG. 37 is a flow chart of the focus detection subroutine in case the intervals of the starts of the charge accumulations are constant. This flow chart will not be explained in detail, since it is similar to that shown in FIG. 33, except that the accumulation starting times are not read because the measurement of the intervals is not necessary. In other parts, the driving of the focus detecting diaphragm 65 and the focus detecting light shading board 67 and the accumulation and read-out of the image signals L₁, R₂, L₃, R₄ and L₅ are executed in a similar manner as in the flow chart shown in FIG. 33.

When a “defocus amount calculation” subroutine is called in a step 1520, the sequence proceeds, through a step 1601, to a step 1602 to execute the “defocus amount calculation” subroutine.

Steps 1602 to 1605 calculate the phase differences δ₁₂, δ₂₃, δ₃₄ and δ₄₅ by correlation calculations similar to those in the steps 1206 to 1209 in FIG. 34, then a step 1607 calculates the phase difference δ corrected by approximation with the second-order function. Then a step 1607 calculates the defocus amount DF, based on the phase difference δ, the sensitivity K of the focus detection system, and the pixel pitch P of the CCD. Thereafter, the present subroutine is terminated by a step 1608.

In the foregoing, there has been explained the focus detecting operation in case the intervals of the starts of image accumulations are constant. The calculation of the phase difference δ can be further simplified by the approximation with the second-order function, with the advantages of significantly reducing the memory capacity and the calculation time. The memory and the calculation time are further reduced since memorizing of the starting times of the image accumulations is unnecessary.

In case the driving time of the focus detecting light shading board 67 fluctuates by a certain level, there may be provided a stabilizing timer which starts the image accumulating operation after the lapse of a predetermined time even if the driving of the focus detecting light shading board 67 is completed within a short time, thereby easily giving regularity to the intervals of the start times of the image accumulations or maintaining such intervals constant. The expiration time of such stabilizing timer need only be longer than the maximum driving time. Also the presence of such a stabilizing timer allows the device to dispense with detection means for detecting the completion of driving of the light shading board 67.

The foregoing embodiments utilize 3 to 5 image signals for calculating the phase difference, corrected for the object movement on the CCD, resulting from the movement of the object or from the hand vibration. For example, with a constant interval of the image accumulations, there may be utilized 6 image signals L₁, R₂, L₃, R₄, L₅ and R₆ to determine the phase differences δ₁₂, δ₂₃, δ₃₄, δ₄₅ and δ₅₆ from which the phase difference δ can be calculated according to the following equation:

δ=(δ₁₂+3δ₂₃+4δ₃₄+3δ₄₅+δ₅₆)/12  (55)

Similarly there may be employed 7 image signals L₁, R₂, L₃, R₄, L₅, R₆ and L₇ to determine the phase differences δ₁₂, δ₂₃, δ₃₄, δ₄₅, δ₅₆ and δ₆₇, from which the phase difference δ can be calculated according to the following equation:

δ=(δ₁₂+3δ₂₃+4δ₃₄+4δ₄₅+3δ₅₆+δ₆₇)/16  (56)

Fourth Embodiment

A fourth embodiment of the present invention selects the number of the image signals and the calculation method therefor, according to the focal length of the photographing lens and the intervals of the storages of the image signals.

FIG. 39 is a simulated chart showing the relationship between the interval of the image signal storages and the focal length of the photographing lens, for which the detection error caused by the hand vibration becomes equal to the permissible error (permissible focal length), in various countermeasures for reducing the influence of the hand vibration.

In the following it is assumed that the image signals L₁ and R₂ have a phase difference δ₁₂, the image signals L₃ and R₂ have a phase difference δ₂₃, the image signals L₃ and R₄ have a phase difference δ₃₄, the image signals L₅ and R₄ have a phase difference δ₄₅, and the intervals of the image signal storages are constant.

In the following:

Non-countermeasure: the phase difference δ to be used in the defocus amount calculation is δ=δ₁₂

Countermeasure 1: the phase difference δ to be used in the defocus amount calculation is δ=(δ₁₂+δ₂₃)/2

Countermeasure 2: the phase difference δ to be used in the defocus amount calculation is represented by:

δ=(δ₁₂+2·δ₂₃+δ₃₄)/4

Countermeasure 3: the phase difference δ to be used in the defocus amount calculation is represented by:

δ=(δ₁₂+3·δ₂₃+3δ₃₄+δ₄₅)/8

Countermeasure 4: the phase difference δ to be used in the defocus amount calculation is represented by:

δ=(δ₁₂+2δ₂₃+2δ₃₄+δ₄₅)/6

and the results are simulated under the condition that the intervals of the image signal storages are constant.

This chart indicates that the permissible focal length becomes larger for a shorter interval of the storage of the image signals and for a larger number of the image signals employed in a single calculation.

However, an increase in the number of the image signals employed in the calculation improves the precision of detection but increases the time required for storing the image signal, thus prolonging the time required for focus detection and deteriorating the operability.

The present embodiment is, therefore, designed to minimize the time required for the focus detection by selecting a minimum necessary number of the image signals required for securing the necessary precision and a matching calculation method, according to the focal length of the actually employed photographing lens, the image accumulation time and the driving time of the focus detecting light shading board 67.

Referring to FIG. 39, the countermeasure 4 is more effective, in comparison with the countermeasure 3, when the interval of the image signal storages is longer than 15 msec, but is less effective in case the interval does not exceed 15 msec. For this reason, the countermeasure 4 or 3 is employed respectively in case the storage interval is longer or shorter than 15 msec.

The configuration of the camera of the fourth embodiment and the principal functions thereof are the same as those of the foregoing first embodiment and will not, therefore, be explained, and, in the following there will be explained the focus detecting operation.

FIG. 40 shows a flow chart of a “focus detection” subroutine. When it is called, the sequence proceeds to a step 1702 through a step 1701.

A step 1702 calculates the accumulation time TC and the gain at the focus detection, based on the object luminance and the aperture value of the focus detecting diaphragm 65 obtained in a light metering subroutine of the step 005 shown in FIG. 20, then a step 1703 reads the drive time TD for the focus detecting light shading board 67 for pupil switching, from the data stored in the ROM, and a step 1704 calculates the interval of the image signal storages as the sum of TC and TD.

A step 1705 detects the focal length FA of the photographing lens, by reading the zoom encoder of the zoom lens. A step 1706 calculates the number NA of the image signals required for a single focus detection, from the interval TA of the image signal storages and the focal length FA of the photographing lens. This calculation method will be explained later in more details.

Steps 1707 and 1708 respectively drive the focus detecting diaphragm 65 and the focus detecting light shading board 67 to the state shown in FIG. 7B.

A step 1709 discriminates whether the number NA calculated in the foregoing step 1706 is 2, and, if NA=2, the sequence proceeds to a step 1713, but, if not, the sequence proceeds to a step 1710. The step 1710 discriminates if NA=3, and, if so, the sequence proceeds to a step 1714, but, if not, the sequence proceeds to a step 1711. The step 1711 discriminates whether NA=4, and, if so, the sequence proceeds to a step 1715, but, if NA≠4, NA has to be 5 and the sequence proceeds to a step 1712.

A step 1713 is an “image signal storage 2” subroutine for storage of two image signals; a step 1714 is an “image signal storage 3” subroutine for storage of three image signals; a step 1715 is an “image signal storage 2” subroutine for storage of two image signals; and a step 1712 is an “image signal storage 5” subroutine for storage of five two image signals.

The subroutines in the steps 1712 to 1715 will be explained later in more details.

After any of the subroutines in the steps 1712 to 1715, the sequence proceeds to steps 1716, 1717 for respectively driving the focus detecting diaphragm 65 and the focus detecting light shading board 67 to the state shown in FIG. 7A.

A next step 1718 calculates the defocus amount of the photographing lens by a “defocus amount calculation” subroutine, and a step 1719 terminates this subroutine. The details of the “defocus amount calculation” subroutine will be explained later.

FIGS. 41 and 42 are flow charts of the “image signal number NA calculating” subroutine. When this subroutine is called in the step 1706 shown in FIG. 40, the sequence proceeds to a step 1802 through a step 1801.

A step 1802 discriminates whether the interval TA of the image signal storages is shorter than 5 msec, and, if TA<5 msec, the sequence proceeds to a step 1803, but, if not, the sequence proceeds to a step 1810. The step 1810 discriminates whether the interval TA of the image signal storages is shorter than 10 msec, and, if TA<10 msec, the sequence proceeds to a step 1811, but, if not, the sequence proceeds to a step 1818. The step 1818 discriminates whether the interval TA of the image signal storages is shorter than 15 msec, and, if TA<15 msec, the sequence proceeds to a step 1819, but, if not, the sequence proceeds to a step 1824. The step 1824 discriminates whether the interval TA of the image signal storages is shorter than 20 msec, and, if TA<20 msec, the sequence proceeds to a step 1825, but, if not, the sequence proceeds to a step 1830.

Assuming that the upper limit value of the accumulation time TC is 20 msec and the driving time of the focus detecting light shading board 67 is 3 msec, the sequence proceeds to the step 1803 in case of TA<5 msec, to the step 1811 in case of 5 msec ≦TA<10 msec, to the step 1819 in case of 10 msec≦TA<15 msec, to the step 1825 in case of 15 msec≦TA<20 msec, or to the step 1830 in case of 20 msec≦TA<23 msec.

The step 1803 discriminates whether the focal length FA of the photographing lens is smaller than 11 mm, and, if FA<11 mm, the sequence proceeds to a step 1807, but, if not, the sequence proceeds to a step 1804. The step 1804 discriminates whether FA is smaller than 83 mm, and, if FA<83 mm, the sequence proceeds to a step 1808 for entering 3 as NA, but, if not, the sequence proceeds to a step 1805. The step 1805 discriminates whether FA is smaller than 207 mm, and, if FA<207 mm, the sequence proceeds to a step 1809 for entering 4 as NA, but, if not, the sequence proceeds to a step 1806 for entering 5 as NA.

In this manner the steps 1803 to 1809 select NA=2 if the focal length FA<11 mm; NA=3 if 11 mm≦FA<83 mm; NA=4 if 83 mm≦FA<207 mm; or NA=5 if FA≧207 mm.

Similarly steps 1811 to 1817 select NA=2 if FA<6 mm; NA=3 if 6 mm≦FA<23 mm; NA=4 if 23 mm≦FA<77 mm; or NA=5 if FA≧77 mm.

Similarly steps 1819 to 1823 select NA=3 if FA<11 mm; NA=4 if 11 mm≦FA<26 mm; or NA=5 if FA≧26 mm.

Similarly steps 1825 to 1829 select NA=3 if FA<6 mm; NA=4 if 6 mm≦FA<12 mm; or NA=5 if FA≧12 mm. Also steps 1830 to 1832 select NA=4 if FA<10 mm; or NA=5 if FA≧10 mm.

After the number NA of the image signals to be employed in a single focus detection is determined from the interval TA of the image signal storages and the focal length FA of the photographing lens, a step 1833 terminates this subroutine.

FIG. 43 shows a flow chart of the “image signal storage 2” subroutine for storage two image signals L₁ and R₂. When this subroutine is called in the step 1713 shown in FIG. 40, the sequence proceeds to a step 1902 through a step 1901.

A step 1902 executes accumulation of the image signal L₁, and a next step 1903 executes read-out thereof. A step 1904 drives the focus detecting light shading board 67 to the state shown in FIG. 7C, then a step 1905 executes accumulation of the image signal R₂, a step 1906 executes read-out thereof, and a step 1907 terminates this subroutine.

FIG. 44 shows a flow chart of the “image signal storage 3” subroutine for storage three image signals L₁, R₂ and L₃. In the present case, it is assumed that the interval of the image signal storages is constant, namely the drive time TD of the focus detecting light shading board 67 and the accumulation time TC are constant. Consequently the measurement of the interval is unnecessary and is not, therefore, conducted.

When the “image signal storage 3” subroutine is called in the step 1714 shown in FIG. 40, the sequence proceeds to a step 2002 through a step 2001.

A step 2002 executes accumulation of the image signal L₁, and a next step 2003 executes read-out thereof. A step 2004 drives the focus detecting light shading board 67 to the state shown in FIG. 7C, and steps 2005 and 2006 execute accumulation and read-out of the image signal R₂. A step 2007 drives again the focus detecting light shading board 67 to the state shown in FIG. 7B, and steps 2008 and 2009 execute accumulation and read-out of the image signal L₃. Then a step 2010 terminates this subroutine.

FIG. 45 shows a flow chart of the “image signal storage 4” subroutine for storage of four image signals L₁, R₂, L₃ and R₄. Also in the present case, it is assumed that the interval of the image signal storages is constant, so that the measurement of the interval is not conducted. When the “image signal storage 4” subroutine is called in the step 1715 shown in FIG. 40, the sequence proceeds to a step 2102 through a step 2101.

Steps 2102 and 2103 execute accumulation and read-out of the image signal L₁. A step 2104 drives the focus detecting light shading board 67 to the state shown in FIG. 7C, and steps 2105 and 2106 execute accumulation and read-out of the image signal R₂. A step 2107 drives again the focus detecting light shading board 67 to the state shown in FIG. 7B, and steps 2108 and 2109 execute accumulation and read-out of the image signal L₃. A step 2110 drives again the focus detecting light shading board 67 to the state shown in FIG. 7C, and steps 2111 and 2112 execute accumulation and read-out of the image signal R₄. Then a step 2113 terminates this subroutine.

FIG. 46 shows a flow chart of the “image signal storage 5” subroutine for storage of five image signals L₁, R₂, L₃, R₄ and L₅. Also, in the present case, it is assumed that the interval of the image signal storages is constant, so that the measurement of the interval is not conducted. When the “image signal storage 5” subroutine is called in the step 1712 shown in FIG. 40, the sequence proceeds to a step 2202 through a step 2201.

Steps 2202 and 2203 execute accumulation and read-out of the image signal L₁. A step 2204 drives the focus detecting light shading board 67 to the state shown in FIG. 7C, and steps 2205 and 2206 execute accumulation and read-out of the image signal R₂. A step 2207 drives again the focus detecting light shading board 67 to the state shown in FIG. 7B, and steps 2208 and 2209 execute accumulation and read-out of the image signal L₃. A step 2210 drives again the focus detecting light shading board 67 to the state shown in FIG. 7C, and steps 2211 and 2212 execute accumulation and read-out of the image signal R₄. A step 2213 drives again the focus detecting light shading board 67 to the state shown in FIG. 7B, and steps 2214 and 2215 execute accumulation and read-out of the image signal L₅. Then a step 2216 terminates this subroutine.

FIG. 47 shows a “defocus amount calculation” subroutine, which switches the calculation formula according to the photographing conditions, in order to secure the necessary precision of detection.

When this subroutine is called in a step 1718 shown in FIG. 40, the sequence proceeds to a step 2302 through a step 2301.

A step 2302 discriminates whether NA is 5, and, if NA=5, a step 2303 executes a calculation process utilizing 5 image signals, but, if NA≠5, the sequence proceeds to a step 2310. The step 2310 discriminates whether NA is 4, and, if NA=4, a step 2311 executes a calculation process utilizing 4 image signals, but, if NA≠4, the sequence proceeds to a step 2315. The step 2315 discriminates whether NA is 3, and, if NA=3, a step 2316 executes a calculation process utilizing 3 image signals, but, if NA≠3, the sequence proceeds to a step 2319 for executing a calculation process utilizing 2 image signals.

The step 2303 calculates the phase difference δ₁₂ of the image signals L₁ and R₂ by correlation calculation, then a step 2304 calculates the phase difference δ₂₃ of the image signals R₂ and L₃, a step 2305 calculates the phase difference δ₃₄ of the image signals L₃ and R₄, and a step 2306 calculates the phase difference δ₄₅ of the image signals R₄ and L₅.

A next step 2307 discriminates whether the interval TA of the image signal storages is longer than 15 msec, and if TA>15 msec, the sequence proceeds to a step 2308, but, if not, the sequence proceeds to a step 2309. This is because, as shown in FIG. 39, the permissible focal length is larger in the countermeasure 4 than in the countermeasure 3 in case the interval of the image signal storages is longer than 15 msec. Thus, in case the interval TA is longer than 15 msec, the sequence proceeds to the step 2308 to execute the calculation according to the countermeasure 4, but, in case the interval TA is shorter than 15 msec, the sequence proceeds to the step 2309 to execute the calculation according to the countermeasure 4, thereby calculating the phase difference δ to be employed in the calculation of the defocus amount.

A step 2311 calculates the phase difference δ₁₂ of the image signals L₁ and R₂, then a step 2312 calculates the phase difference δ₂₃ of the image signals R₂ and L₃, and a step 2313 calculates the phase difference δ₃₄ of the image signals L₃ and R₄. A next step 2314 calculates the phase difference δ to be employed in the calculation of the defocus amount, according to the calculation process of the countermeasure 2.

A step 2316 calculates the phase difference δ₁₂ of the image signals L₁ and R₂, and a step 2317 calculates the phase difference δ₂₃ of the image signals R₂ and L₃. A next step 2318 calculates the phase difference δ to be employed in the calculation of the defocus amount, according to the calculation process of the countermeasure 1.

A step 2319 calculates the phase difference δ₁₂ of the image signals L₁ and R₂, and a step 2320 enters δ₁₂ as the phase difference δ to be employed in the calculation of the defocus amount.

After the calculation of the phase difference δ by the step 2308, 2309, 2314, 2318 or 2320, the sequence proceeds to a step 2321 for calculating the defocus amount DF according the phase difference δ, the sensitivity K of the focus detecting system and the pixel pitch P of the CCD, and a step 2322 terminates this subroutine.

The foregoing embodiment, capable of selecting the minimum number of the image signals and the calculation method capable of securing the necessary precision of detection, according to the photographing conditions (focal length of photographing lens, and interval of image signal storages), can dispense with the storage operation for the unnecessary image signals, thereby reducing the time required for focus detection and also reducing the electric power consumption.

The foregoing embodiments employ a CCD as the solid-state image pickup device, and such CCD is not limited to an area sensor but can also be composed of a line sensor. Also, the means for changing the shape of the pupil is composed of the focus detecting diaphragm 65, but it may also be composed of a diaphragm utilizing physical property, such as a diaphragm composed of an LCD.

The entry and retraction of the focus detecting light shading board 67 into and from the photographing optical path are executed by a motor, but an actuator, such as a plunger, may also be used for this purpose.

In the foregoing there has been considered a camera with two pupil areas, but there can be provided three or more pupil areas. Also these pupil areas are so arranged that they are in the horizontal direction (together with the direction of lines of the CCD) when the camera is held in the normal position, but such arrangement is not restrictive and the pupil areas may be so arranged as to be in the vertical direction when the camera is held in the normal position.

Also, the moving amount detection range, for detecting the moving amount of the object in the vertical direction (perpendicular to the direction of arrangement of the pupil areas), is determined, as explained with reference to FIG. 17, in consideration of the focal length of the photographing lens, the interval of the image signal storages, the image signal accumulating time and the driving time of the focus detecting light shading board 67 (means for changing the pupil shape), but the effect of a certain level can be obtained by considering at least one of these information. Particularly, in case the entry and retraction of the focus detecting light shading board 67 into and from the photographing optical path are executed by a motor as in the foregoing embodiments, the driving time of the light shading board is almost constant and this information is therefore almost negligible.

Also, the number of the image signals to be employed for detecting the moving amount of the object in the vertical direction (perpendicular to the direction of arrangement of the pupil areas), is determined, as explained with reference to FIGS. 41 and 42, in consideration of the focal length of the photographing lens, the interval of the image signal storages, the image signal accumulating time and the driving time of the focus detecting light shading board 67 (means for changing the pupil shape), but the effect of a certain level can be obtained by considering at least one of these information.

Also, the foregoing embodiments intend to reduce the error in the focus detection, resulting from the hand vibration or from the movement of the object, for example by storage the image signals L₁, R₂, L₃, R₄ and L₅ and utilizing the phase differences between the image signals L₁ and R₂, between R₂ and L₃, between L₃ and R₄ and between R₄ and L₅, but such reduction in the error of focus detection can also be attained by such calculations plural times and taking the average or the weighted average of the obtained results.

Furthermore, though the present invention has been explained by its application to a digital camera, it is likewise applicable also to a video camera of a conventional camera utilizing a silver halide-based film. 

What is claimed is:
 1. An auto focusing device in which a first image is entered onto a sensor through a first area of an imaging optical system so as to provide a first image signal corresponding thereto, a second image is entered onto said sensor at a timing different from a timing of entering said first image onto said sensor through a second area of said imaging optical system different from said first area so as to provide a second image signal corresponding thereto, and a phase difference between said first image signal and second image signal is detected so as to obtain information for a focusing operation, wherein said sensor consists of an area sensor including a plurality of pixel lines in which pixels are arranged in a first direction and a plurality of pixel lines in which pixels are arranged in a second direction perpendicular to said first direction, said device comprising: a detecting circuit which detects levels of coincidence of first image signals in predetermined pixel lines with respect to second image signals in said predetermined pixel lines respectively; and a determining circuit which obtains information for focusing operation based on said phase difference between said first image signal and second image signal of which a coincidence level is highest among said level of coincidences detected by said detecting circuit.
 2. A focus detecting device provided with an image pickup device for image recording, an imaging optical system, pupil shape changing means for dividing the light beam passing through said optical system into at least two areas time-sequentially for focusing on said image pickup device, and a calculation circuit which calculates the focus state of said optical system by converting the images time-sequentially focused on said image pickup device respectively through said areas into image signals and detecting the phase difference of said image signals, the device comprising: a) a displacement amount detection circuit which detects the amount of displacement in a direction perpendicular to the direction of the arrangement of each of said areas of the optical image on said image pickup device, said displacement amount detection circuit being adapted to detect the displacement amount of said optical image by a correlation value indicating the level of coincidence of the optical images; and b) an image signal position displacing means for displacing the position of the image signal stored in said image pickup device to be employed in the phase difference detection in said calculation circuit, according to the output of said displacement amount detection circuit.
 3. A focus detecting device according to claim 2, wherein said displacement amount detection circuit is adapted to generate new image signals in a direction perpendicular to the direction of arrangement of said areas, by an interpolation calculation on the image signals obtained by said image pickup device, and to detect the displacement amount of said optical images also by employing said new image signals obtained by the interpolation calculation.
 4. A focus detecting device according to claim 2, wherein said displacement amount detection circuit is adapted to detect a position where the level of coincidence of the optical images becomes highest, as the displacement amount of said optical images.
 5. A focus detecting device according to claim 4, wherein said displacement amount detection circuit is adapted to determine the displacement amount of said optical image as zero, in case the difference between the correlation where the level of coincidence of the optical images becomes highest and the correlation obtained in case of absence of the optical image is smaller than a predetermined value.
 6. A focus detecting device according to claim 2, further comprising region setting means for setting a region in which the detection of the displacement amount by said displacement amount detection circuit is carried out.
 7. A focus detecting device according to claim 6, wherein said region setting means changes the region for the detection of the displacement amount in accordance with imaging condition.
 8. A focus detecting device according to claim 6, wherein said region setting means sets the region for the detection of the displacement amount based on at least one of a focal length of said optical system, an accumulation time of the optical image by said image pickup device, a time interval for storage of said image signal, and driving time of said pupil shape changing means. 